RNA-seq analysis on the Indian Dataset

Load in Dataset

Read in the indata.rds dataset. Which assays are availble in this dataset. Print out the sample information data (colData).

indata <- readRDS("~/Desktop/indata.rds") ## change directory information

### lists the availble gene expression types
assays(indata)
## List of length 4
## names(4): counts log_counts counts_cpm log_counts_cpm
### gene expression data
counts <- assay(indata, "counts")
#head(counts)

### sample information
colData(indata)
## DataFrame with 89 rows and 4 columns
##                 BMI Tb_status bmi_cat2    batch
##           <numeric>  <factor> <factor> <factor>
## 10200042B     14.81      LTBI     mal         1
## 10200088B     13.92      LTBI     mal         1
## 10200129B     24.15      LTBI     well        1
## 10200131B     15.09      LTBI     mal         1
## 10200171B     28.12      LTBI     well        1
## ...             ...       ...      ...      ...
## 10200111A      16.5      LTBI     well        2
## 10200112A      11.5      TB       mal         2
## 10200016A      15.6      TB       mal         2
## 10200015A      14.3      TB       mal         2
## 10200087A      15.6      TB       mal         2

Summarize the colData (Table 1 in paper)

Summarize the sample information data, provide relevant tables and plots.

Save colData as a Tibble

column_dat <- as_tibble(colData(indata))
datatable(column_dat)

Summarize TB Status

Summarize BMI by TB Status

Summarize Malnourishment Status

Summarize Malnourishment by TB Status

Batch effects correction

Evaluate whether batch effects are present in the data and if correction if is needed. If so, correct for batch. Use the log_counts_cpm assay for plotting.

PCA plot (unadjusted)

Plot the first two principal components, colored by batch, TB status as symbols

log_cpm_dat <- as.matrix(assay(indata, "log_counts_cpm"))

UMAP plot (unadjusted)

Plot the UMAP projection, colored by batch, TB status as symbols

Batch correction (ComBat and ComBat-seq)

Adjust the log_counts_cpm with ComBat and the counts using ComBat-Seq. Use Tb_status and bmi_cat2 as covariates.

## ComBat on log_counts_cpm
cov_model <- model.matrix(~Tb_status+bmi_cat2,
                          data=colData(indata))
combat_adjust <- ComBat(log_cpm_dat, colData(indata)$batch, cov_model)
## Found2batches
## Adjusting for2covariate(s) or covariate level(s)
## Standardizing Data across genes
## Fitting L/S model and finding priors
## Finding parametric adjustments
## Adjusting the Data
assay(indata,"combat_log_counts_cpm") <- combat_adjust

## ComBat-Seq on counts

PCA plot (batch adjusted)

Plot the first two principal components, colored by batch, TB status as symbols

UMAP plot (batch adjusted)

Plot the UMAP projection, colored by batch, TB status as symbols

set.seed(0)

Conduct differential expression (TB vs LTBI)

Use DESeq2 to calculate differential expression using the ComBat-Seq adjusted counts between TB and LTBI (Tb_status), adjusting for malnutrition status (bmi_cat2).

Apply DESeq2

Heatmap of DEGs

# Make a Heatmap of DEGs

TBSignatureProfiler Analysis

The TBSignatureProfiler was developed in the Johnson Lab in 2021 to profile new and existing TB gene expression signatures https://bmcinfectdis.biomedcentral.com/articles/10.1186/s12879-020-05598-z. Help documentation and vignettes are available at https://wejlab.github.io/TBSignatureProfiler-docs/

TBsigs <- TBsignatures[-12] ## Remove Chendi_HIV_2 signature because we only have one of the genes
ssgsea_res <- runTBsigProfiler(indata, useAssay = "combat_log_counts_cpm",
                                 signatures = TBsigs,
                                 algorithm = "ssGSEA",
                                 combineSigAndAlgorithm = TRUE,
                                 parallel.sz = 1)
## Warning: Calling gsva(expr=., gset.idx.list=., method=., ...) is deprecated;
## use a method-specific parameter object (see '?gsva').

Signature Heatmap

Signature Boxplots

Boxplots Single

for (i in names(TBsigs)){

  cat("#####" , i, "\n")

  print(signatureBoxplot(ssgsea_res, name=i, signatureColNames = i,
                 annotationColName = c("Tb_status")))
  
  cat("\n\n")
}
Anderson_42
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Anderson_OD_51
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Berry_393
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Berry_OD_86
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Blankley_380
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Blankley_5
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Bloom_OD_144
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Bloom_RES_268
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Bloom_RES_558
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Chen_5
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Chen_HIV_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Darboe_RISK_11
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Dawany_HIV_251
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Duffy_23
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Esmail_203
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Esmail_82
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Esmail_OD_893
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Estevez_133
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Estevez_259
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Francisco_OD_2
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gjoen_10
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gjoen_7
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gliddon_2_OD_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gliddon_HIV_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gliddon_OD_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gliddon_OD_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Gong_OD_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Heycken_FAIL_22
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Hoang_OD_13
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Hoang_OD_20
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Hoang_OD_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Huang_OD_13
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Jacobsen_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Jenum_8
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Kaforou_27
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Kaforou_OD_44
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Kaforou_OD_53
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Kaul_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Kulkarni_HIV_2
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Kwan_186
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

LauxdaCosta_OD_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Lee_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Leong_24
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Leong_RISK_29
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Long_RES_10
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Maertzdorf_15
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Maertzdorf_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Maertzdorf_OD_100
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Natarajan_7
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

PennNich_RISK_6
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Qian_OD_17
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Rajan_HIV_5
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Roe_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Roe_OD_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Sambarey_HIV_10
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Singhania_OD_20
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Sivakumaran_11
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Sloot_HIV_2
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Suliman_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Suliman_RISK_2
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Suliman_RISK_4
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Sweeney_OD_3
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Tabone_OD_11
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Tabone_RES_25
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Tabone_RES_27
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Thompson_9
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Thompson_FAIL_13
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Thompson_RES_5
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Tornheim_71
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Tornheim_RES_25
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Vargas_18
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Vargas_42
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Verhagen_10
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Walter_51
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Walter_PNA_119
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Walter_PNA_47
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Zak_RISK_16
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Zhao_NANO_6
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.
## Warning: Use of `boxplotdfm$Group` is discouraged.
## ℹ Use `Group` instead.
## Warning: Use of `boxplotdfm$Score` is discouraged.
## ℹ Use `Score` instead.

Signature Gene Heatmaps

for (i in names(TBsigs)){

  cat("#####" , i, "\n")

  
  
  cat("\n\n")
}
Anderson_42
Anderson_OD_51
Berry_393
Berry_OD_86
Blankley_380
Blankley_5
Bloom_OD_144
Bloom_RES_268
Bloom_RES_558
Chen_5
Chen_HIV_4
Darboe_RISK_11
Dawany_HIV_251
Duffy_23
Esmail_203
Esmail_82
Esmail_OD_893
Estevez_133
Estevez_259
Francisco_OD_2
Gjoen_10
Gjoen_7
Gliddon_2_OD_4
Gliddon_HIV_3
Gliddon_OD_3
Gliddon_OD_4
Gong_OD_4
Heycken_FAIL_22
Hoang_OD_13
Hoang_OD_20
Hoang_OD_3
Huang_OD_13
Jacobsen_3
Jenum_8
Kaforou_27
Kaforou_OD_44
Kaforou_OD_53
Kaul_3
Kulkarni_HIV_2
Kwan_186
LauxdaCosta_OD_3
Lee_4
Leong_24
Leong_RISK_29
Long_RES_10
Maertzdorf_15
Maertzdorf_4
Maertzdorf_OD_100
Natarajan_7
PennNich_RISK_6
Qian_OD_17
Rajan_HIV_5
Roe_3
Roe_OD_4
Sambarey_HIV_10
Singhania_OD_20
Sivakumaran_11
Sloot_HIV_2
Suliman_4
Suliman_RISK_2
Suliman_RISK_4
Sweeney_OD_3
Tabone_OD_11
Tabone_RES_25
Tabone_RES_27
Thompson_9
Thompson_FAIL_13
Thompson_RES_5
Tornheim_71
Tornheim_RES_25
Vargas_18
Vargas_42
Verhagen_10
Walter_51
Walter_PNA_119
Walter_PNA_47
Zak_RISK_16
Zhao_NANO_6

AUC Table

set.seed(0)

AUC Boxplots

set.seed(0)

ROC plots

Separate ROC plots

for (i in names(TBsigs)){
  
  cat("#####" , i, "\n")
  
 
  
  
  cat("\n\n")
}
Anderson_42
Anderson_OD_51
Berry_393
Berry_OD_86
Blankley_380
Blankley_5
Bloom_OD_144
Bloom_RES_268
Bloom_RES_558
Chen_5
Chen_HIV_4
Darboe_RISK_11
Dawany_HIV_251
Duffy_23
Esmail_203
Esmail_82
Esmail_OD_893
Estevez_133
Estevez_259
Francisco_OD_2
Gjoen_10
Gjoen_7
Gliddon_2_OD_4
Gliddon_HIV_3
Gliddon_OD_3
Gliddon_OD_4
Gong_OD_4
Heycken_FAIL_22
Hoang_OD_13
Hoang_OD_20
Hoang_OD_3
Huang_OD_13
Jacobsen_3
Jenum_8
Kaforou_27
Kaforou_OD_44
Kaforou_OD_53
Kaul_3
Kulkarni_HIV_2
Kwan_186
LauxdaCosta_OD_3
Lee_4
Leong_24
Leong_RISK_29
Long_RES_10
Maertzdorf_15
Maertzdorf_4
Maertzdorf_OD_100
Natarajan_7
PennNich_RISK_6
Qian_OD_17
Rajan_HIV_5
Roe_3
Roe_OD_4
Sambarey_HIV_10
Singhania_OD_20
Sivakumaran_11
Sloot_HIV_2
Suliman_4
Suliman_RISK_2
Suliman_RISK_4
Sweeney_OD_3
Tabone_OD_11
Tabone_RES_25
Tabone_RES_27
Thompson_9
Thompson_FAIL_13
Thompson_RES_5
Tornheim_71
Tornheim_RES_25
Vargas_18
Vargas_42
Verhagen_10
Walter_51
Walter_PNA_119
Walter_PNA_47
Zak_RISK_16
Zhao_NANO_6